/**
 * desc:表格中展示第三方商品信息html
 * @item {object} 商品的信息
 *
 */
 import React from 'react';
 import {
	 formatAmount,
 } from '@/utils/utils.jsx';
 import CommonParagraph from '@/components/CommonParagraph';
 import CommonSysImg from '@/components/CommonImg/SysComponent';
 import styles from './index.module.less';
 
 export default ({ item = {}, isPrice = false, hasGoodsCode = false, hasGoodsCode2 }) => {
	 const {
		 goodsImage,
		 goodsName,
		 skuName,
		 goodsPrice,
         skuId,
		 isCarefullySelected,
	 } = item;
	 return (
		 <div className={styles.wrap}>
			 {/* <div className={styles.imgWrap}>{renderImg(path, src)}</div> */}
			 <div className={styles.imgWrap}>
				 <CommonSysImg
					 img={goodsImage}
					 isCloudIcon={isCarefullySelected == '1' ? true : false}
				 />
			 </div>
				 <div>
					 <div style={{ whiteSpace: 'pre-wrap' }}>
						 {goodsName} {skuName}
						 <CommonParagraph text={ skuName ? `${goodsName} ${skuName}`: `${goodsName}`} />
					 </div>
						{hasGoodsCode && <span>商品编码：{skuId}</span>}
						{hasGoodsCode2 && <span>系统商品编码：{skuId}</span>}
					 {isPrice && (
						 <p className="common-color5">
							 价格：
							 <span className="common-color9">
								 ¥{formatAmount(goodsPrice)}
							 </span>
						 </p>
					 )}
				 </div>
		 </div>
	 );
 };
 